function [largestVelConComp] = peakFinder ( velocityLogical, windowedImg)

    arraySize = size(velocityLogical);

    nCol = arraySize(2);

    threshold = 0.1;

    y = zeros(nCol, 1);
    
    counter = 1; %Sends a counter into the recursive function in to prevent it from becoming locked in a loop
    [largestVelConComp, filteredCurve] = removeArtifacts (threshold, windowedImg, nCol, arraySize, y, counter);
    
    nConnComp = 1;
    
    counter = 1; %Sends a counter into the recursive function in to prevent it from becoming locked in a loop
    [ largestVelConComp ] = replaceMissingComponents( largestVelConComp, filteredCurve, nConnComp, nCol, y, counter);
   
end


